<?php
include("../inc/conn.inc");
include("../inc/page.php");
$hover=2;
$url="primarylist.php";
$thepage=$_GET['page']?$_GET['page']:1;
$maxpage=20;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>产品编号<?=$_GET[fromid]?>-<?=$_GET[toid]?>，供应产品索引，三帝贸易网</title><link href="/css/body.css" rel="stylesheet" type="text/css" />
<link href="/css/link.css" rel="stylesheet" type="text/css" />
<link href="/css/head_1.css" rel="stylesheet" type="text/css" />
<link href="/Supply/css/list.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include("../inc/head_top.php")?>
<?php include("../inc/menu_2.php")?>
<div id="mian" class="topside6 side">
<div class="title">您所在的位置：<a href="/">首页</a> >> <a href="/supply/primary.php">供应产品索引</a> >> 产品编号<?=$_GET[fromid]?>-<?=$_GET[toid]?></div>
<div class="onl"></div>
</div>
<div class="w960 topside20 side">
<script type="text/javascript">/*960*90，创建于2011-3-9*/ var cpro_id = 'u403357';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
<div class="onl"></div>
</div>
<div id="mian" class="topside6">
<div class="leftmain">
<div>
<DIV class="zzb3 side">
<DIV style="width:120px;float:left;height:25px;line-height: 25px;" align="center">图片</DIV>
<DIV style="width:276px;float:left;height:25px;line-height: 25px;" align="center">供应产品信息</DIV>
<DIV style="width:100px;float:left;height:25px;line-height: 25px;" align="center">
</DIV>
<DIV style="width:90px;float:left;height:25px;line-height: 25px;" align="center">单价/起定量</DIV>
<DIV style="width:80px;float:left;height:25px;line-height: 25px;" align="center">会员类型</DIV>
</DIV>
<?php
//product.id>='$_GET[fromid]' and product.id<='$_GET[toid]'
//$rs=mysql_query("select product.id,product.p_title,product.picture,product.p_addtime,product.p_info,product.p_price,product.p_minorder,member.m_type,member.m_user,member.m_cname,member.pro,member.city from product inner join member on (product.member_id=member.id) where (product.id between $_GET[fromid] and $_GET[toid]) and product.p_sh=1 order by id desc limit ".($thepage-1)*$maxpage.",$maxpage");

$rs=mysql_query("select id,p_title,picture,p_addtime,p_info,p_price,p_minorder,m_type from product where (id between $_GET[fromid] and $_GET[toid]) and p_sh=1 order by id desc limit ".($thepage-1)*$maxpage.",$maxpage");

while($row=mysql_fetch_array($rs)){
?>
<DIV class=zzb4 id=Info6197>
<DIV class=zzb4-2>
<a href="/supply/<?=$row['id']?>.html" target="_blank">
<?php if(trim($row[picture])){?>
<img src="/upfile/<?=$row[picture]?>" alt="<?=$row[p_title]?>" border="0" width="91" height="83"/>
<?php }else{?>
<img src="/images/prono88.gif" width=91 height=83 border="0" />
<?php }?></a></DIV>
<DIV class=zzb4-3>
<DIV class=zzb4-3-1><a href="/supply/<?=$row['id']?>.html" target="_blank"><?=mb_substr($row[p_title],0,16,'utf-8')?></a><SPAN 
style="FONT-WEIGHT: normal" class="size10 fontgray"><?=date("Y-m-d",strtotime($row[p_addtime]))?></SPAN></DIV>
<DIV class=zzb4-3-Time></DIV>
<DIV class=zzb4-3-2><?=trim(mb_substr(strip_tags($row[p_info]),0,70,'utf-8'))?></DIV>
<DIV class=zzb4-3-3>
<DIV style="FLOAT: left;font-weight: lighter;"></DIV>
<DIV style="FLOAT: right; COLOR: #999999;font-weight: lighter;"></DIV></DIV></DIV>
<DIV class=zzb5>
  <DIV style="TEXT-ALIGN: center" class="fontred size14 b"><?=$row[p_price]?></DIV>
<div class="size11 fontgray"><?=$row[p_minorder]?></div></DIV>
<DIV class=zzb52>
<div style="COLOR: #999999;font-weight: lighter;">
<?php if($row[m_type]==6){?><img src="/images/member1.gif"/ border="0"><?php }?></div>
</DIV>
<DIV class=zzb53>
  <div class="ms"><a href="/supply/<?=$row['id']?>.html" target="_blank"><img src="/images/list02.gif" border="0" /></a></div>
</DIV>
<div class="onl"></div>
</DIV>
<?php }//id>='$_GET[fromid]' and id<='$_GET[toid]'
$rs2=mysql_query("select count(id) from product where (id between $_GET[fromid] and $_GET[toid]) and p_sh=1");
$totalrecord=mysql_result($rs2,0); 
$totalpage=ceil($totalrecord/$maxpage);
mysql_free_result($rs2);


?>
</div>
<div class="onl"></div>
<div class="page">
<div class="pageleft">
<ul>
<?php primarypages($thepage,$totalpage,$maxpage,4,$_GET[fromid],$_GET[toid]);?>
</ul>
</div>
<div class="pageright">
<form name="pageform" method="post" action="" onSubmit="return onCheckPage()"> 
共<?=$totalpage?>页　到
<input type="text" name="page" class="input-txt" size="5" maxlength="5">页
<input type="submit" value="确定" class="but">
</form>
<script language="javascript"> 
function onCheckPage(){
var page = parseInt(document.pageform.page.value); 
if(isNaN(page)){
alert("请输入数字(1,<?=$totalpage?>)");
return false; 
}
if(page<=0){
page =1; 
}
if(page ><?=$totalpage?>){
page=<?=$totalpage?>;
}
if(page>1){
document.pageform.action = "/supply/from<?=$_GET[fromid]?>-to<?=$_GET[toid]?>-pid"+page+".html"; 
}else{
document.pageform.action = "/supply/from<?=$_GET[fromid]?>-to<?=$_GET[toid]?>-pid1.html"; 
}
return true;
}
</script>
  </div>
<div class="onl"></div>
</div>
</div>
<div class="rightmain">
  <div class="right side">
  <div class="title b">黄金展位供应商</div>
  <div style="width:180px;" align="center">
	<script type="text/javascript"><!--
google_ad_client = "pub-2924453545159453";
/* 160x600, 创建于 11-3-13 */
google_ad_slot = "6251201312";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
	</div>
  <div style="width:180px; margin-top:20px;" align="center"><script type="text/javascript"> /*160*600，创建于2010-8-4*/ var cpro_id = 'u136291';</script>
<script type="text/javascript" src="http://cpro.baidu.com/cpro/ui/c.js"></script>
</div>
  </div>
</div>
<div class="onl"></div>
</div>
<div class="w960 topside20 downside20 side">
<script type="text/javascript">/*960*90，创建于2011-3-9*/ var cpro_id = 'u403357';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
<div class="onl"></div>
</div>

<?php include("../inc/foot.php");?>
</body>
</html>
